home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
overm82.zip
/
BTBATS.ZIP
/
MAIL.BAT
< prev
next >
Wrap
DOS Batch File
|
1990-02-19
|
4KB
|
174 lines
echo off
rem
rem *------------------------------------------------------------*
rem * Mail handler batch file - Runs mail utilities and the *
rem * nodelist compiler. *
rem *------------------------------------------------------------*
rem
d:
cd\binkley
:Process
:Premail
echo CD
echo ╒═[ Export Mail ]═══════════════════════════════════════════════════════════╕
echo │ Exporting new messages from RBBS-PC to *.MSGs │
echo ╘═══════════════════════════════════════════════════════════════════════════╛
echo CD
rem
rem Scan all of the RBBS message bases to export newly-entered
rem messages into *.MSGs
rem
rem Use R2FC. If we're rescanning the message base, add /RESCAN
rem to the command line.
rem
rem R2FC exits with the following errorlevels:
rem
rem 0 = Nothing Exported
rem 1 = System Misconfigured or Disk Error
rem 2 = New Messages Exported, and need to be Scanned
r2fc overmail.cfg %3
if errorlevel 2 goto DoQMScan
if errorlevel 1 goto BadCFG
goto SkipQMScan
:DoQMScan
rem
rem Run Qmail to export new messages to other systems.
rem
rem Use -q to force it to run quietly.
qm scan pack -q
:SkipQMScan
:Posmail
echo CD
echo ╒═[ Import Mail ]═══════════════════════════════════════════════════════════╕
echo │ Importing new *.MSGs into RBBS-PC │
echo ╘═══════════════════════════════════════════════════════════════════════════╛
echo CD
rem
rem Let QMail unpack received packets into *.MSG files and
rem to pack messages that need to be forwarded to other nodes.
rem
rem Use -q to force it to run quietly.
qm toss scan -q
if errorlevel 3 goto DiskFull
qm pack -q
if errorlevel 3 goto DiskFull
rem
rem Import new *.MSGs into the RBBS message base.
rem
rem Use F2RC. F2RC exits with the following errorlevels:
rem
rem 1 = System Misconfigured or Disk Error
rem 0 = Processing OK
f2rc overmail.cfg
if errorlevel 1 goto BadCFG
if %1$ == $ goto SkipRenum
if %1 == renum goto Renum
if %1 == RENUM goto Renum
if %1 == Renum goto Renum
goto SkipRenum
:Renum
echo CD
echo ╒═[ Pack/Renum ]════════════════════════════════════════════════════════════╕
echo │ Packing and renumbering all of the messages on the system │
echo ╘═══════════════════════════════════════════════════════════════════════════╛
echo CD
rem
rem Pack the main RBBS messages file.
rem
pip overmail.cfg
rem
rem Run the renumbering program.
rem
renum311 overmail.cfg
goto End
:SkipRenum
goto End
:Usage
echo Usage: MAIL [shell] [renum] [/rescan]
echo .
echo Add the keyword SHELL to cause the batch file not not reinvoke
echo BinkleyTerm, but just to terminate.
echo .
echo Add the keyword RENUM to cause the messages to be packed
echo and renumbered.
echo .
echo Add the keyword /rescan to cause the messages to be rescanned.
goto Terminate
:BadCFG
echo System Misconfigured or disk full. Fix that, will you?
pause
goto Terminate
:DiskFull
echo QMail reports that your disk is full. Do something about it.
pause
goto Terminate
:End
rem
rem Restart the bulletin board by invoking the BinkleyTerm batch file
rem
if %2$ == $ goto ChkShell1
if %2 == shell goto Terminate
if %2 == SHELL goto Terminate
if %2 == Shell goto Terminate
:ChkShell1
if %1$ == $ goto SkipShell1
if %1 == shell goto Terminate
if %1 == SHELL goto Terminate
if %1 == Shell goto Terminate
:SkipShell1
binkley.bat
:Terminate